package org.dx.oho.entity;

import java.util.Objects;

/**
 * District
 * create by duanx 2020/12/18
 *@description： todo
 *@classname: District
 *@author: duanx
 *@date: 2020/12/18 16:21
 **/
public class District extends BaseEntity {
    /**
     * 区划ID
     */
    private Integer id;
    /**
     * 父区划ID
     */
    private Integer parentId;
    /**
     * 区划名称
     */
    private String districtName;
    /**
     * 区划编码
     */
    private String districtCode;
    /**
     * 父区划编码
     */
    private String parentCode;
    /**
     * 区划级别
     */
    private Integer districtLevel;
    /**
     * 排序号
     */
    private Integer districtSort;
    /**
     * 名称-英文
     */
    private String districtNameEn;
    /**
     * 名称-英文-简写
     */
    private String districtShortNameEn;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public String getDistrictName() {
        return districtName;
    }

    public void setDistrictName(String districtName) {
        this.districtName = districtName;
    }

    public String getDistrictCode() {
        return districtCode;
    }

    public void setDistrictCode(String districtCode) {
        this.districtCode = districtCode;
    }

    public String getParentCode() {
        return parentCode;
    }

    public void setParentCode(String parentCode) {
        this.parentCode = parentCode;
    }

    public Integer getDistrictLevel() {
        return districtLevel;
    }

    public void setDistrictLevel(Integer districtLevel) {
        this.districtLevel = districtLevel;
    }

    public Integer getDistrictSort() {
        return districtSort;
    }

    public void setDistrictSort(Integer districtSort) {
        this.districtSort = districtSort;
    }

    public String getDistrictNameEn() {
        return districtNameEn;
    }

    public void setDistrictNameEn(String districtNameEn) {
        this.districtNameEn = districtNameEn;
    }

    public String getDistrictShortNameEn() {
        return districtShortNameEn;
    }

    public void setDistrictShortNameEn(String districtShortNameEn) {
        this.districtShortNameEn = districtShortNameEn;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        District district = (District) o;
        return Objects.equals(id, district.id) &&
                Objects.equals(parentId, district.parentId) &&
                Objects.equals(districtName, district.districtName) &&
                Objects.equals(districtCode, district.districtCode) &&
                Objects.equals(parentCode, district.parentCode) &&
                Objects.equals(districtLevel, district.districtLevel) &&
                Objects.equals(districtSort, district.districtSort) &&
                Objects.equals(districtNameEn, district.districtNameEn) &&
                Objects.equals(districtShortNameEn, district.districtShortNameEn)&&
                Objects.equals(getCreateTime(),district.getCreateTime())&&
                Objects.equals(getLastEditTime(),district.getLastEditTime());
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, parentId, districtName, districtCode, parentCode, districtLevel, districtSort, districtNameEn, districtShortNameEn,getCreateTime(),getLastEditTime());
    }

    @Override
    public String toString() {
        return "District{" +
                "id=" + id +
                ", parentId=" + parentId +
                ", districtName='" + districtName + '\'' +
                ", districtCode='" + districtCode + '\'' +
                ", parentCode='" + parentCode + '\'' +
                ", districtLevel=" + districtLevel +
                ", districtSort=" + districtSort +
                ", districtNameEn='" + districtNameEn + '\'' +
                ", districtShortNameEn='" + districtShortNameEn + '\'' +
                super.toString()+
                '}';
    }
}
